A general barrier instruction issuing condition in a multiprocessor system occurs when a dependency between a certain data reference and a following data reference or the dependency relationship is unclear. If the presence or absence of this data dependency cannot be determined except at the time of instruction execution, or the dependency analysis of a compiler is disabled, barrier instructions are output for execution in the parallel processing object program.
Conventional methods for reducing unnecessary barrier instructions are known. In one example, a barrier instruction reduction directive statement for a compiler is inserted with a user directive statement or a data dependency cancellation directive statement is inserted in the source program.
FIG. 3 shows an example of a source program in which a directive statement for reducing unnecessary barrier instructions is inserted. This source program is written in an implementation of FORTRAN that is extended for paralleling capability. A description of an example of the source program is as follows.
The source program shown in the example of FIG. 3 includes a DO loop 31 for iterative execution of processing by substituting the values i=1 to n sequentially into an array indicated by a(i). If an overlap between the reference range of array "a" in the DO loop 31 and the reference range of a following array 33 cannot be determined at the time of compilation and therefore can be determined only at the time of instruction execution, a barrier instruction reducing directive statement 32 for the compiler needs to be inserted by the user with a user directive statement. It should be noted that this directive statement 32 may be a data dependency cancellation directive statement. It should also be noted that "POPOPTION" is a directive statement indicating that the user provides a directive for paralleling a portion of the program that cannot be automatically put in parallel processing form by a parallel processing capability implemented by a FORTRAN processing system.